<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/common/meta.jsp" %>
<title>用户列表信息</title>
</head>
<body>
<div class="container">
	<h3>用户列表信息</h3>
	<div style="margin-left: 5px; margin-bottom: 10px;" class="btn-group" >
		<a href="${ctx}/admin/userAdd!doInit.action" class="btn">添加用户</a>
	</div>
	<table class="table table-bordered table-hover"  style="margin: 5px; padding: 0;">
		<thead>
			<tr>
				<th>用户编号</th>
				<th>用户姓名</th>
				<th>邮箱地址</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="user" items="${list}">
			<tr>
				<td><c:out value="${user.id}"></c:out></td>
				<td><c:out value="${user.userName}"></c:out></td>
				<td><c:out value="${user.email}"></c:out></td>
				<td><a href="${ctx}/admin/userEdit!doInit.action?id=${user.id}" class="btn btn-primary">编辑</a>&nbsp;&nbsp;<a href="${ctx}/admin/userList!doDelete.action?id=${user.id}" class="btn btn-danger">删除</a></td>
			</tr>
			</c:forEach>
		</tbody>
		
	</table>
<!-- 	<div class="pagination" style="margin: 0; padding: 0; float: right;"> -->
<!-- 		<ul> -->
<%-- 			<li><a href="<%=request.getContextPath()%>/empList?pageNo=1">Fisrt</a></li> --%>
<%-- 			<% if (p.getCurrentPage() != 1) {%> --%>
<%-- 			<li><a href="<%=request.getContextPath()%>/empList?pageNo=<%=p.getCurrentPage()-1 %>">Prev</a></li> --%>
<%-- 			<%} %> --%>
<%-- 			<li><span><%=p.getCurrentPage() %> / <%=p.getTotalPage() %></span></li> --%>
<%-- 			<% if (p.getCurrentPage() != p.getTotalPage()) {%> --%>
<%-- 			<li><a href="<%=request.getContextPath()%>/empList?pageNo=<%=p.getCurrentPage()+1 %>">Next</a></li> --%>
<%-- 			<%} %> --%>
<%-- 			<li><a href="<%=request.getContextPath()%>/empList?pageNo=<%=p.getTotalPage()%>">Last</a></li> --%>
<!-- 		</ul> -->
<!-- 	</div> -->
</div>
</body>
</html>